# -*- coding:utf8 -*-
# __author__ = "zhangying"
# __date__ = "2019/2/21 10:44"

import os
os.system('adb connect 127.0.0.1:21503')
os.system('adb connect 127.0.0.1:21513')
# print(os.system('adb connect 4e48e65b'))
# print(os.system('adb devices'))
# print(os.popen('adb devices').readlines())
#获取设备信息 例127.0.0.1:21503


class DosCmd:
    #获取设备id
    def excute_cmd_result(self,command):
        result_list = []
        result = os.popen(command).readlines()
        for i in result:
            if i == '\n':
                continue
            result_list.append(i.strip('\n'))
        return result_list

    def excute_cmd(self,command):
        os.system(command)


if __name__ == '__main__':
    dos = DosCmd()
    print(dos.excute_cmd_result('adb devices'))